#pragma once

#include <QObject>

struct FrameStruct
{
    void* buffer;
    int fd;
//    MppFrameColorSpace mpp_colour_space;
//    MppFrameColorRange mpp_colour_range;
//    MppFrameColorPrimaries mpp_colour_primaries;
    uint32_t width;
    uint32_t height;
    uint32_t offset_x;
    uint32_t offset_y;
    uint32_t hor_stride;
    uint32_t ver_stride;
};
Q_DECLARE_METATYPE(FrameStruct)

class Decoder : public QObject
{
    Q_OBJECT
public:
    explicit Decoder(QObject *parent = nullptr);

    bool start_a_gbm();

Q_SIGNALS:
    void frameReceived(const FrameStruct& frame);

private:


};
